<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="prc.*" %>  

<%
  	String error="";
  	String messageText = request.getParameter("message");
  	int cat = Integer.parseInt(request.getParameter("cat"));
	int forum = Integer.parseInt(request.getParameter("f"));
	int thread = Integer.parseInt(request.getParameter("t"));
	Categorie categorie = ForumManagement.categorii.get(cat);
	Sectiune sectiune = categorie.sectiuni.get(forum);
	//sectiune.setLastPostUser(UserManagement.getCurrentUser(session));
	Topic topic = sectiune.findTopic(thread);
	Mesaj message = new Mesaj(messageText, UserManagement.getCurrentUser(session));
	topic.addMessage(message);
	sectiune.setFirst(topic);
  %>


<jsp:include page="top.jsp"/>



<div id="page-body">


	<div class="panel">
		<div class="inner"><span class="corners-top"><span></span></span>
		<fieldset class="fields2">
		<% response.sendRedirect("./viewthread.jsp?cat="+cat+"&f=" +forum+"&t="+thread); %>
		
		</fieldset>
	</div>
	<div class="panel">
		<div class="inner"><span class="corners-top"><span></span></span>
	
		<span class="corners-bottom"><span></span></span></div>
	</div>


</div>


</div>

<jsp:include page="bottom.jsp"/>